/**
 * 
 */
package cn.ad.server.web.spring.service.actions;


import cn.ad.server.web.spring.model.AdRequest;
import cn.ad.server.web.spring.model.AdResponse;
import cn.ad.server.web.spring.model.BidAdRequest;
import cn.ad.server.web.spring.model.BidAdResponse;
import org.springframework.dao.DataAccessException;

/**
 * @author Administrator
 *
 */
public abstract class BidAdRequestAction implements IAdRequestAction {

	/* (non-Javadoc)
	 * @see cn.ad.server.web.spring.service.IAdService#doRequest(cn.ad.server.web.request.AdRequest)
	 */
	@Override
	public AdResponse doRequest(AdRequest request)  throws RequestActionException{
		try{
			return doRequest((BidAdRequest)request);
		}catch(DataAccessException ex){
			throw new RequestActionException(ex.getMessage(), ex);
		}
	}
	
	/**
	 * bid请求抽象方法
	 * @param request
	 * @return
	 */
	abstract BidAdResponse doRequest(BidAdRequest request);
}
